package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BilliardsGameEightBallRecordMapper;
import com.ruoyi.system.domain.BilliardsGameEightBallRecord;
import com.ruoyi.system.service.IBilliardsGameEightBallRecordService;

/**
 * 中式八球比赛记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-11
 */
@Service
public class BilliardsGameEightBallRecordServiceImpl implements IBilliardsGameEightBallRecordService 
{
    @Autowired
    private BilliardsGameEightBallRecordMapper billiardsGameEightBallRecordMapper;

    /**
     * 查询中式八球比赛记录
     * 
     * @param id 中式八球比赛记录主键
     * @return 中式八球比赛记录
     */
    @Override
    public BilliardsGameEightBallRecord selectBilliardsGameEightBallRecordById(Long id)
    {
        return billiardsGameEightBallRecordMapper.selectBilliardsGameEightBallRecordById(id);
    }

    /**
     * 查询中式八球比赛记录列表
     * 
     * @param billiardsGameEightBallRecord 中式八球比赛记录
     * @return 中式八球比赛记录
     */
    @Override
    public List<BilliardsGameEightBallRecord> selectBilliardsGameEightBallRecordList(BilliardsGameEightBallRecord billiardsGameEightBallRecord)
    {
        return billiardsGameEightBallRecordMapper.selectBilliardsGameEightBallRecordList(billiardsGameEightBallRecord);
    }

    /**
     * 新增中式八球比赛记录
     * 
     * @param billiardsGameEightBallRecord 中式八球比赛记录
     * @return 结果
     */
    @Override
    public int insertBilliardsGameEightBallRecord(BilliardsGameEightBallRecord billiardsGameEightBallRecord)
    {
        billiardsGameEightBallRecord.setCreateTime(DateUtils.getNowDate());
        return billiardsGameEightBallRecordMapper.insertBilliardsGameEightBallRecord(billiardsGameEightBallRecord);
    }

    /**
     * 修改中式八球比赛记录
     * 
     * @param billiardsGameEightBallRecord 中式八球比赛记录
     * @return 结果
     */
    @Override
    public int updateBilliardsGameEightBallRecord(BilliardsGameEightBallRecord billiardsGameEightBallRecord)
    {
        billiardsGameEightBallRecord.setUpdateTime(DateUtils.getNowDate());
        return billiardsGameEightBallRecordMapper.updateBilliardsGameEightBallRecord(billiardsGameEightBallRecord);
    }

    /**
     * 批量删除中式八球比赛记录
     * 
     * @param ids 需要删除的中式八球比赛记录主键
     * @return 结果
     */
    @Override
    public int deleteBilliardsGameEightBallRecordByIds(Long[] ids)
    {
        return billiardsGameEightBallRecordMapper.deleteBilliardsGameEightBallRecordByIds(ids);
    }

    /**
     * 删除中式八球比赛记录信息
     * 
     * @param id 中式八球比赛记录主键
     * @return 结果
     */
    @Override
    public int deleteBilliardsGameEightBallRecordById(Long id)
    {
        return billiardsGameEightBallRecordMapper.deleteBilliardsGameEightBallRecordById(id);
    }
}
